import 'package:flutter/material.dart';

abstract class Bundle extends Widget{
  String get id;
  //类目名称
  String get name;

  Widget get icon;
  //排序
  int get sort;
  //第几级类目，默认 1
  int get depth;
  //父类目id，没有为 0
  int get parentId;
}

abstract class StatelessBundle extends StatelessWidget
    implements Bundle {
  //第几级类目，默认 1
  int get depth => 1;
  //父类目id，没有为 0
  int get parentId => 0;
  const StatelessBundle({Key key}) : super(key: key);
}

abstract class StatefulBundle extends StatefulWidget
    implements Bundle {
  //第几级类目，默认 1
  int get depth => 1;
  //父类目id，没有为 0
  int get parentId => 0;
  const StatefulBundle({Key key}) : super(key: key);
}
